#ifndef __VECTOR3_H
#define __VECTOR3_H

#include "defaultsetting.h"
#include <iostream>

class Vector3
{
  public:
    Vector3();
    Vector3(const REAL ax,const REAL ay,const REAL az);
    Vector3(const Vector3 &v);
    
    REAL getX()const;
    REAL getY()const;
    REAL getZ()const;
    void set(const REAL ax,const REAL ay,const REAL az);
    void setX(const REAL ax);
    void setY(const REAL ay);
    void setZ(const REAL az);
    /**
      * Modify the module without change the angle
      */
    REAL getModule()const;
    /**
      * Modify the angle without change the module
      */
    void setModule(const REAL m);
    Vector3 operator+(const Vector3 &v)const;
    Vector3 operator-(const Vector3 &v)const;
    Vector3 operator*(const REAL k)const;
    bool operator==(const Vector3 &v)const;
    bool operator!=(const Vector3 &v)const;
    Vector3 operator-();
    void print()const;
    
  private:
    REAL x;
    REAL y;
    REAL z;
   
};

REAL getAngle(const Vector3 &v,const Vector3 &w);
/**
  * Makes the scalar product of vector a and b.
  * @returns The number the result of the operation.
  */
REAL doProduct(const Vector3 &v,const Vector3 &w);
Vector3 crossProduct(const Vector3 &v, const Vector3 &w);

#endif
